]> dgit.raspbian.org Git - gnome-shell.git/commitdiff
shell/global: Iterate over all leisure closures
authorAlessandro Bono <alessandro.bono369@gmail.com>
Mon, 29 Jun 2026 11:16:40 +0000 (13:16 +0200)
committerFlorian Müllner <fmuellner@gnome.org>
Sun, 2 Aug 2026 16:49:13 +0000 (18:49 +0200)
The loop was using 'closures->data' instead of 'iter->data', causing
only the first leisure closure to be executed and freed on each cycle.
All subsequent closures in the list were leaked.

Part-of: <https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/4275>
(cherry picked from commit 28fc2fc85b34e8c8291330d4b62d5a3e1092b3d6)

src/shell-global.c

index b6565a64e00dd670dbbf1c4cf4ebce47731ab1d9..dc4075e26a8e669d21fa5b399529aea777947595 100644 (file)
@@ -1277,7 +1277,7 @@ run_leisure_functions (gpointer data)
 
   for (iter = closures; iter; iter = iter->next)
     {
-      LeisureClosure *closure = closures->data;
+      LeisureClosure *closure = iter->data;
       closure->func (closure->user_data);
 
       if (closure->notify)